# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS
Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

#
# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys

from thrift.transport import TTransport


class Proc_Command(object):
    """
    **** VERSION 1 STRUCTURES *****

    Attributes:
     - app_id
     - env_id
     - operators
     - cmd
     - proc_id
     - params
     - ipaddr
     - ctime
     - session_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "app_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "env_id",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "operators",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "cmd",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "proc_id",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.LIST,
            "params",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 6
        (
            7,
            TType.STRING,
            "ipaddr",
            "UTF8",
            None,
        ),  # 7
        (
            8,
            TType.I32,
            "ctime",
            None,
            None,
        ),  # 8
        (
            9,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 9
    )

    def __init__(
        self,
        app_id=None,
        env_id=None,
        operators=None,
        cmd=None,
        proc_id=None,
        params=None,
        ipaddr=None,
        ctime=None,
        session_id=None,
    ):
        self.app_id = app_id
        self.env_id = env_id
        self.operators = operators
        self.cmd = cmd
        self.proc_id = proc_id
        self.params = params
        self.ipaddr = ipaddr
        self.ctime = ctime
        self.session_id = session_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.app_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.env_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.operators = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.cmd = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.proc_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.params = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.params.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.ipaddr = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.ctime = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("Proc_Command")
        if self.app_id is not None:
            oprot.writeFieldBegin("app_id", TType.STRING, 1)
            oprot.writeString(self.app_id.encode("utf-8") if sys.version_info[0] == 2 else self.app_id)
            oprot.writeFieldEnd()
        if self.env_id is not None:
            oprot.writeFieldBegin("env_id", TType.STRING, 2)
            oprot.writeString(self.env_id.encode("utf-8") if sys.version_info[0] == 2 else self.env_id)
            oprot.writeFieldEnd()
        if self.operators is not None:
            oprot.writeFieldBegin("operators", TType.STRING, 3)
            oprot.writeString(self.operators.encode("utf-8") if sys.version_info[0] == 2 else self.operators)
            oprot.writeFieldEnd()
        if self.cmd is not None:
            oprot.writeFieldBegin("cmd", TType.STRING, 4)
            oprot.writeString(self.cmd.encode("utf-8") if sys.version_info[0] == 2 else self.cmd)
            oprot.writeFieldEnd()
        if self.proc_id is not None:
            oprot.writeFieldBegin("proc_id", TType.STRING, 5)
            oprot.writeString(self.proc_id.encode("utf-8") if sys.version_info[0] == 2 else self.proc_id)
            oprot.writeFieldEnd()
        if self.params is not None:
            oprot.writeFieldBegin("params", TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.params))
            for iter6 in self.params:
                oprot.writeString(iter6.encode("utf-8") if sys.version_info[0] == 2 else iter6)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ipaddr is not None:
            oprot.writeFieldBegin("ipaddr", TType.STRING, 7)
            oprot.writeString(self.ipaddr.encode("utf-8") if sys.version_info[0] == 2 else self.ipaddr)
            oprot.writeFieldEnd()
        if self.ctime is not None:
            oprot.writeFieldBegin("ctime", TType.I32, 8)
            oprot.writeI32(self.ctime)
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 9)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CmdResult(object):
    """
    Attributes:
     - seq_id
     - app_id
     - env_id
     - proc_id
     - host_name
     - ipaddr
     - error_code
     - error_msg
     - end_time
     - content
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "seq_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "app_id",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "env_id",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "proc_id",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "host_name",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.STRING,
            "ipaddr",
            "UTF8",
            None,
        ),  # 6
        (
            7,
            TType.I32,
            "error_code",
            None,
            None,
        ),  # 7
        (
            8,
            TType.STRING,
            "error_msg",
            "UTF8",
            None,
        ),  # 8
        (
            9,
            TType.I32,
            "end_time",
            None,
            None,
        ),  # 9
        (
            10,
            TType.STRING,
            "content",
            "UTF8",
            None,
        ),  # 10
    )

    def __init__(
        self,
        seq_id=None,
        app_id=None,
        env_id=None,
        proc_id=None,
        host_name=None,
        ipaddr=None,
        error_code=None,
        error_msg=None,
        end_time=None,
        content=None,
    ):
        self.seq_id = seq_id
        self.app_id = app_id
        self.env_id = env_id
        self.proc_id = proc_id
        self.host_name = host_name
        self.ipaddr = ipaddr
        self.error_code = error_code
        self.error_msg = error_msg
        self.end_time = end_time
        self.content = content

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.seq_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.app_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.env_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.proc_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.host_name = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ipaddr = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.end_time = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.content = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CmdResult")
        if self.seq_id is not None:
            oprot.writeFieldBegin("seq_id", TType.STRING, 1)
            oprot.writeString(self.seq_id.encode("utf-8") if sys.version_info[0] == 2 else self.seq_id)
            oprot.writeFieldEnd()
        if self.app_id is not None:
            oprot.writeFieldBegin("app_id", TType.STRING, 2)
            oprot.writeString(self.app_id.encode("utf-8") if sys.version_info[0] == 2 else self.app_id)
            oprot.writeFieldEnd()
        if self.env_id is not None:
            oprot.writeFieldBegin("env_id", TType.STRING, 3)
            oprot.writeString(self.env_id.encode("utf-8") if sys.version_info[0] == 2 else self.env_id)
            oprot.writeFieldEnd()
        if self.proc_id is not None:
            oprot.writeFieldBegin("proc_id", TType.STRING, 4)
            oprot.writeString(self.proc_id.encode("utf-8") if sys.version_info[0] == 2 else self.proc_id)
            oprot.writeFieldEnd()
        if self.host_name is not None:
            oprot.writeFieldBegin("host_name", TType.STRING, 5)
            oprot.writeString(self.host_name.encode("utf-8") if sys.version_info[0] == 2 else self.host_name)
            oprot.writeFieldEnd()
        if self.ipaddr is not None:
            oprot.writeFieldBegin("ipaddr", TType.STRING, 6)
            oprot.writeString(self.ipaddr.encode("utf-8") if sys.version_info[0] == 2 else self.ipaddr)
            oprot.writeFieldEnd()
        if self.error_code is not None:
            oprot.writeFieldBegin("error_code", TType.I32, 7)
            oprot.writeI32(self.error_code)
            oprot.writeFieldEnd()
        if self.error_msg is not None:
            oprot.writeFieldBegin("error_msg", TType.STRING, 8)
            oprot.writeString(self.error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        if self.end_time is not None:
            oprot.writeFieldBegin("end_time", TType.I32, 9)
            oprot.writeI32(self.end_time)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin("content", TType.STRING, 10)
            oprot.writeString(self.content.encode("utf-8") if sys.version_info[0] == 2 else self.content)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Proc_AsyncRsp(object):
    """
    Attributes:
     - app_id
     - error_code
     - error_msg
     - unique_id
     - env_id
     - session_id
     - proctask_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "app_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.I32,
            "error_code",
            None,
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "error_msg",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "unique_id",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "env_id",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 6
        (
            7,
            TType.STRING,
            "proctask_id",
            "UTF8",
            None,
        ),  # 7
    )

    def __init__(
        self,
        app_id=None,
        error_code=None,
        error_msg=None,
        unique_id=None,
        env_id=None,
        session_id=None,
        proctask_id=None,
    ):
        self.app_id = app_id
        self.error_code = error_code
        self.error_msg = error_msg
        self.unique_id = unique_id
        self.env_id = env_id
        self.session_id = session_id
        self.proctask_id = proctask_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.app_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.unique_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.env_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.proctask_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("Proc_AsyncRsp")
        if self.app_id is not None:
            oprot.writeFieldBegin("app_id", TType.STRING, 1)
            oprot.writeString(self.app_id.encode("utf-8") if sys.version_info[0] == 2 else self.app_id)
            oprot.writeFieldEnd()
        if self.error_code is not None:
            oprot.writeFieldBegin("error_code", TType.I32, 2)
            oprot.writeI32(self.error_code)
            oprot.writeFieldEnd()
        if self.error_msg is not None:
            oprot.writeFieldBegin("error_msg", TType.STRING, 3)
            oprot.writeString(self.error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        if self.unique_id is not None:
            oprot.writeFieldBegin("unique_id", TType.STRING, 4)
            oprot.writeString(self.unique_id.encode("utf-8") if sys.version_info[0] == 2 else self.unique_id)
            oprot.writeFieldEnd()
        if self.env_id is not None:
            oprot.writeFieldBegin("env_id", TType.STRING, 5)
            oprot.writeString(self.env_id.encode("utf-8") if sys.version_info[0] == 2 else self.env_id)
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 6)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        if self.proctask_id is not None:
            oprot.writeFieldBegin("proctask_id", TType.STRING, 7)
            oprot.writeString(self.proctask_id.encode("utf-8") if sys.version_info[0] == 2 else self.proctask_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class Proc_SyncRsp(object):
    """
    Attributes:
     - error_code
     - error_msg
     - content
     - session_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "error_code",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "error_msg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.MAP,
            "content",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 4
    )

    def __init__(
        self,
        error_code=None,
        error_msg=None,
        content=None,
        session_id=None,
    ):
        self.error_code = error_code
        self.error_msg = error_msg
        self.content = content
        self.session_id = session_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.content = {}
                    (_ktype8, _vtype9, _size7) = iprot.readMapBegin()
                    for _i11 in range(_size7):
                        _key12 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val13 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.content[_key12] = _val13
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("Proc_SyncRsp")
        if self.error_code is not None:
            oprot.writeFieldBegin("error_code", TType.I32, 1)
            oprot.writeI32(self.error_code)
            oprot.writeFieldEnd()
        if self.error_msg is not None:
            oprot.writeFieldBegin("error_msg", TType.STRING, 2)
            oprot.writeString(self.error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin("content", TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content))
            for kiter14, viter15 in self.content.items():
                oprot.writeString(kiter14.encode("utf-8") if sys.version_info[0] == 2 else kiter14)
                oprot.writeString(viter15.encode("utf-8") if sys.version_info[0] == 2 else viter15)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 4)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class TaskResponse(object):
    """
    Attributes:
     - error_code
     - error_msg
     - success
     - failed
     - execInfo
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "error_code",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "error_msg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.LIST,
            "success",
            (TType.STRUCT, (CmdResult, CmdResult.thrift_spec), False),
            None,
        ),  # 3
        (
            4,
            TType.LIST,
            "failed",
            (TType.STRUCT, (CmdResult, CmdResult.thrift_spec), False),
            None,
        ),  # 4
        (
            5,
            TType.LIST,
            "execInfo",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 5
    )

    def __init__(
        self,
        error_code=None,
        error_msg=None,
        success=None,
        failed=None,
        execInfo=None,
    ):
        self.error_code = error_code
        self.error_msg = error_msg
        self.success = success
        self.failed = failed
        self.execInfo = execInfo

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype19, _size16) = iprot.readListBegin()
                    for _i20 in range(_size16):
                        _elem21 = CmdResult()
                        _elem21.read(iprot)
                        self.success.append(_elem21)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.failed = []
                    (_etype25, _size22) = iprot.readListBegin()
                    for _i26 in range(_size22):
                        _elem27 = CmdResult()
                        _elem27.read(iprot)
                        self.failed.append(_elem27)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.execInfo = []
                    (_etype31, _size28) = iprot.readListBegin()
                    for _i32 in range(_size28):
                        _elem33 = (
                            iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        )
                        self.execInfo.append(_elem33)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("TaskResponse")
        if self.error_code is not None:
            oprot.writeFieldBegin("error_code", TType.I32, 1)
            oprot.writeI32(self.error_code)
            oprot.writeFieldEnd()
        if self.error_msg is not None:
            oprot.writeFieldBegin("error_msg", TType.STRING, 2)
            oprot.writeString(self.error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        if self.success is not None:
            oprot.writeFieldBegin("success", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter34 in self.success:
                iter34.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.failed is not None:
            oprot.writeFieldBegin("failed", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.failed))
            for iter35 in self.failed:
                iter35.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.execInfo is not None:
            oprot.writeFieldBegin("execInfo", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.execInfo))
            for iter36 in self.execInfo:
                oprot.writeString(iter36.encode("utf-8") if sys.version_info[0] == 2 else iter36)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AppEnvType(object):
    """
    Attributes:
     - env_id
     - env_name
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "env_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "env_name",
            "UTF8",
            None,
        ),  # 2
    )

    def __init__(
        self,
        env_id=None,
        env_name=None,
    ):
        self.env_id = env_id
        self.env_name = env_name

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.env_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.env_name = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AppEnvType")
        if self.env_id is not None:
            oprot.writeFieldBegin("env_id", TType.STRING, 1)
            oprot.writeString(self.env_id.encode("utf-8") if sys.version_info[0] == 2 else self.env_id)
            oprot.writeFieldEnd()
        if self.env_name is not None:
            oprot.writeFieldBegin("env_name", TType.STRING, 2)
            oprot.writeString(self.env_name.encode("utf-8") if sys.version_info[0] == 2 else self.env_name)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AppInfo(object):
    """
    Attributes:
     - app_id
     - display_name
     - env_list
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "app_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "display_name",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.LIST,
            "env_list",
            (TType.STRUCT, (AppEnvType, AppEnvType.thrift_spec), False),
            None,
        ),  # 3
    )

    def __init__(
        self,
        app_id=None,
        display_name=None,
        env_list=None,
    ):
        self.app_id = app_id
        self.display_name = display_name
        self.env_list = env_list

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.app_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.display_name = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.env_list = []
                    (_etype40, _size37) = iprot.readListBegin()
                    for _i41 in range(_size37):
                        _elem42 = AppEnvType()
                        _elem42.read(iprot)
                        self.env_list.append(_elem42)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AppInfo")
        if self.app_id is not None:
            oprot.writeFieldBegin("app_id", TType.STRING, 1)
            oprot.writeString(self.app_id.encode("utf-8") if sys.version_info[0] == 2 else self.app_id)
            oprot.writeFieldEnd()
        if self.display_name is not None:
            oprot.writeFieldBegin("display_name", TType.STRING, 2)
            oprot.writeString(self.display_name.encode("utf-8") if sys.version_info[0] == 2 else self.display_name)
            oprot.writeFieldEnd()
        if self.env_list is not None:
            oprot.writeFieldBegin("env_list", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.env_list))
            for iter43 in self.env_list:
                iter43.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class AppList(object):
    """
    Attributes:
     - error_code
     - error_msg
     - app_list
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "error_code",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "error_msg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.LIST,
            "app_list",
            (TType.STRUCT, (AppInfo, AppInfo.thrift_spec), False),
            None,
        ),  # 3
    )

    def __init__(
        self,
        error_code=None,
        error_msg=None,
        app_list=None,
    ):
        self.error_code = error_code
        self.error_msg = error_msg
        self.app_list = app_list

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.app_list = []
                    (_etype47, _size44) = iprot.readListBegin()
                    for _i48 in range(_size44):
                        _elem49 = AppInfo()
                        _elem49.read(iprot)
                        self.app_list.append(_elem49)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("AppList")
        if self.error_code is not None:
            oprot.writeFieldBegin("error_code", TType.I32, 1)
            oprot.writeI32(self.error_code)
            oprot.writeFieldEnd()
        if self.error_msg is not None:
            oprot.writeFieldBegin("error_msg", TType.STRING, 2)
            oprot.writeString(self.error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.error_msg)
            oprot.writeFieldEnd()
        if self.app_list is not None:
            oprot.writeFieldBegin("app_list", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.app_list))
            for iter50 in self.app_list:
                iter50.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class CCUser(object):
    """
    Attributes:
     - name
     - passwd
     - login_time
     - ipaddr
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "name",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "passwd",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.I32,
            "login_time",
            None,
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "ipaddr",
            "UTF8",
            None,
        ),  # 4
    )

    def __init__(
        self,
        name=None,
        passwd=None,
        login_time=None,
        ipaddr=None,
    ):
        self.name = name
        self.passwd = passwd
        self.login_time = login_time
        self.ipaddr = ipaddr

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.name = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.passwd = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.login_time = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.ipaddr = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("CCUser")
        if self.name is not None:
            oprot.writeFieldBegin("name", TType.STRING, 1)
            oprot.writeString(self.name.encode("utf-8") if sys.version_info[0] == 2 else self.name)
            oprot.writeFieldEnd()
        if self.passwd is not None:
            oprot.writeFieldBegin("passwd", TType.STRING, 2)
            oprot.writeString(self.passwd.encode("utf-8") if sys.version_info[0] == 2 else self.passwd)
            oprot.writeFieldEnd()
        if self.login_time is not None:
            oprot.writeFieldBegin("login_time", TType.I32, 3)
            oprot.writeI32(self.login_time)
            oprot.writeFieldEnd()
        if self.ipaddr is not None:
            oprot.writeFieldBegin("ipaddr", TType.STRING, 4)
            oprot.writeString(self.ipaddr.encode("utf-8") if sys.version_info[0] == 2 else self.ipaddr)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class proc_command(object):
    """
    **** VERSION 2 STRUCTURES *****

    Attributes:
     - bk_biz_id
     - bk_set_type
     - bk_username
     - cmd
     - proc_id
     - params
     - ip
     - create_time
     - session_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "bk_biz_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "bk_set_type",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "bk_username",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "cmd",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "proc_id",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.LIST,
            "params",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 6
        (
            7,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 7
        (
            8,
            TType.I32,
            "create_time",
            None,
            None,
        ),  # 8
        (
            9,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 9
    )

    def __init__(
        self,
        bk_biz_id=None,
        bk_set_type=None,
        bk_username=None,
        cmd=None,
        proc_id=None,
        params=None,
        ip=None,
        create_time=None,
        session_id=None,
    ):
        self.bk_biz_id = bk_biz_id
        self.bk_set_type = bk_set_type
        self.bk_username = bk_username
        self.cmd = cmd
        self.proc_id = proc_id
        self.params = params
        self.ip = ip
        self.create_time = create_time
        self.session_id = session_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.bk_biz_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.bk_set_type = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bk_username = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.cmd = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.proc_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.LIST:
                    self.params = []
                    (_etype54, _size51) = iprot.readListBegin()
                    for _i55 in range(_size51):
                        _elem56 = (
                            iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        )
                        self.params.append(_elem56)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.I32:
                    self.create_time = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("proc_command")
        if self.bk_biz_id is not None:
            oprot.writeFieldBegin("bk_biz_id", TType.STRING, 1)
            oprot.writeString(self.bk_biz_id.encode("utf-8") if sys.version_info[0] == 2 else self.bk_biz_id)
            oprot.writeFieldEnd()
        if self.bk_set_type is not None:
            oprot.writeFieldBegin("bk_set_type", TType.STRING, 2)
            oprot.writeString(self.bk_set_type.encode("utf-8") if sys.version_info[0] == 2 else self.bk_set_type)
            oprot.writeFieldEnd()
        if self.bk_username is not None:
            oprot.writeFieldBegin("bk_username", TType.STRING, 3)
            oprot.writeString(self.bk_username.encode("utf-8") if sys.version_info[0] == 2 else self.bk_username)
            oprot.writeFieldEnd()
        if self.cmd is not None:
            oprot.writeFieldBegin("cmd", TType.STRING, 4)
            oprot.writeString(self.cmd.encode("utf-8") if sys.version_info[0] == 2 else self.cmd)
            oprot.writeFieldEnd()
        if self.proc_id is not None:
            oprot.writeFieldBegin("proc_id", TType.STRING, 5)
            oprot.writeString(self.proc_id.encode("utf-8") if sys.version_info[0] == 2 else self.proc_id)
            oprot.writeFieldEnd()
        if self.params is not None:
            oprot.writeFieldBegin("params", TType.LIST, 6)
            oprot.writeListBegin(TType.STRING, len(self.params))
            for iter57 in self.params:
                oprot.writeString(iter57.encode("utf-8") if sys.version_info[0] == 2 else iter57)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 7)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        if self.create_time is not None:
            oprot.writeFieldBegin("create_time", TType.I32, 8)
            oprot.writeI32(self.create_time)
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 9)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class cmd_result(object):
    """
    Attributes:
     - seq_id
     - bk_biz_id
     - bk_set_type
     - proc_id
     - bk_host_name
     - ip
     - bk_error_code
     - bk_error_msg
     - end_time
     - content
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "seq_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "bk_biz_id",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "bk_set_type",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "proc_id",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "bk_host_name",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 6
        (
            7,
            TType.I32,
            "bk_error_code",
            None,
            None,
        ),  # 7
        (
            8,
            TType.STRING,
            "bk_error_msg",
            "UTF8",
            None,
        ),  # 8
        (
            9,
            TType.I32,
            "end_time",
            None,
            None,
        ),  # 9
        (
            10,
            TType.STRING,
            "content",
            "UTF8",
            None,
        ),  # 10
    )

    def __init__(
        self,
        seq_id=None,
        bk_biz_id=None,
        bk_set_type=None,
        proc_id=None,
        bk_host_name=None,
        ip=None,
        bk_error_code=None,
        bk_error_msg=None,
        end_time=None,
        content=None,
    ):
        self.seq_id = seq_id
        self.bk_biz_id = bk_biz_id
        self.bk_set_type = bk_set_type
        self.proc_id = proc_id
        self.bk_host_name = bk_host_name
        self.ip = ip
        self.bk_error_code = bk_error_code
        self.bk_error_msg = bk_error_msg
        self.end_time = end_time
        self.content = content

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.seq_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.bk_biz_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bk_set_type = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.proc_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bk_host_name = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.I32:
                    self.bk_error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.bk_error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.end_time = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.content = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("cmd_result")
        if self.seq_id is not None:
            oprot.writeFieldBegin("seq_id", TType.STRING, 1)
            oprot.writeString(self.seq_id.encode("utf-8") if sys.version_info[0] == 2 else self.seq_id)
            oprot.writeFieldEnd()
        if self.bk_biz_id is not None:
            oprot.writeFieldBegin("bk_biz_id", TType.STRING, 2)
            oprot.writeString(self.bk_biz_id.encode("utf-8") if sys.version_info[0] == 2 else self.bk_biz_id)
            oprot.writeFieldEnd()
        if self.bk_set_type is not None:
            oprot.writeFieldBegin("bk_set_type", TType.STRING, 3)
            oprot.writeString(self.bk_set_type.encode("utf-8") if sys.version_info[0] == 2 else self.bk_set_type)
            oprot.writeFieldEnd()
        if self.proc_id is not None:
            oprot.writeFieldBegin("proc_id", TType.STRING, 4)
            oprot.writeString(self.proc_id.encode("utf-8") if sys.version_info[0] == 2 else self.proc_id)
            oprot.writeFieldEnd()
        if self.bk_host_name is not None:
            oprot.writeFieldBegin("bk_host_name", TType.STRING, 5)
            oprot.writeString(self.bk_host_name.encode("utf-8") if sys.version_info[0] == 2 else self.bk_host_name)
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 6)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        if self.bk_error_code is not None:
            oprot.writeFieldBegin("bk_error_code", TType.I32, 7)
            oprot.writeI32(self.bk_error_code)
            oprot.writeFieldEnd()
        if self.bk_error_msg is not None:
            oprot.writeFieldBegin("bk_error_msg", TType.STRING, 8)
            oprot.writeString(self.bk_error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.bk_error_msg)
            oprot.writeFieldEnd()
        if self.end_time is not None:
            oprot.writeFieldBegin("end_time", TType.I32, 9)
            oprot.writeI32(self.end_time)
            oprot.writeFieldEnd()
        if self.content is not None:
            oprot.writeFieldBegin("content", TType.STRING, 10)
            oprot.writeString(self.content.encode("utf-8") if sys.version_info[0] == 2 else self.content)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class task_response(object):
    """
    Attributes:
     - bk_error_code
     - bk_error_msg
     - success
     - failed
     - exec_info
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "bk_error_code",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "bk_error_msg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.LIST,
            "success",
            (TType.STRUCT, (cmd_result, cmd_result.thrift_spec), False),
            None,
        ),  # 3
        (
            4,
            TType.LIST,
            "failed",
            (TType.STRUCT, (cmd_result, cmd_result.thrift_spec), False),
            None,
        ),  # 4
        (
            5,
            TType.LIST,
            "exec_info",
            (TType.STRING, "UTF8", False),
            None,
        ),  # 5
    )

    def __init__(
        self,
        bk_error_code=None,
        bk_error_msg=None,
        success=None,
        failed=None,
        exec_info=None,
    ):
        self.bk_error_code = bk_error_code
        self.bk_error_msg = bk_error_msg
        self.success = success
        self.failed = failed
        self.exec_info = exec_info

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.bk_error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.bk_error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype61, _size58) = iprot.readListBegin()
                    for _i62 in range(_size58):
                        _elem63 = cmd_result()
                        _elem63.read(iprot)
                        self.success.append(_elem63)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.LIST:
                    self.failed = []
                    (_etype67, _size64) = iprot.readListBegin()
                    for _i68 in range(_size64):
                        _elem69 = cmd_result()
                        _elem69.read(iprot)
                        self.failed.append(_elem69)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.LIST:
                    self.exec_info = []
                    (_etype73, _size70) = iprot.readListBegin()
                    for _i74 in range(_size70):
                        _elem75 = (
                            iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        )
                        self.exec_info.append(_elem75)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("task_response")
        if self.bk_error_code is not None:
            oprot.writeFieldBegin("bk_error_code", TType.I32, 1)
            oprot.writeI32(self.bk_error_code)
            oprot.writeFieldEnd()
        if self.bk_error_msg is not None:
            oprot.writeFieldBegin("bk_error_msg", TType.STRING, 2)
            oprot.writeString(self.bk_error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.bk_error_msg)
            oprot.writeFieldEnd()
        if self.success is not None:
            oprot.writeFieldBegin("success", TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter76 in self.success:
                iter76.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.failed is not None:
            oprot.writeFieldBegin("failed", TType.LIST, 4)
            oprot.writeListBegin(TType.STRUCT, len(self.failed))
            for iter77 in self.failed:
                iter77.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.exec_info is not None:
            oprot.writeFieldBegin("exec_info", TType.LIST, 5)
            oprot.writeListBegin(TType.STRING, len(self.exec_info))
            for iter78 in self.exec_info:
                oprot.writeString(iter78.encode("utf-8") if sys.version_info[0] == 2 else iter78)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class proc_async_rsp(object):
    """
    Attributes:
     - bk_biz_id
     - bk_error_code
     - bk_error_msg
     - unique_id
     - bk_set_type
     - session_id
     - task_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "bk_biz_id",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.I32,
            "bk_error_code",
            None,
            None,
        ),  # 2
        (
            3,
            TType.STRING,
            "bk_error_msg",
            "UTF8",
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "unique_id",
            "UTF8",
            None,
        ),  # 4
        (
            5,
            TType.STRING,
            "bk_set_type",
            "UTF8",
            None,
        ),  # 5
        (
            6,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 6
        (
            7,
            TType.STRING,
            "task_id",
            "UTF8",
            None,
        ),  # 7
    )

    def __init__(
        self,
        bk_biz_id=None,
        bk_error_code=None,
        bk_error_msg=None,
        unique_id=None,
        bk_set_type=None,
        session_id=None,
        task_id=None,
    ):
        self.bk_biz_id = bk_biz_id
        self.bk_error_code = bk_error_code
        self.bk_error_msg = bk_error_msg
        self.unique_id = unique_id
        self.bk_set_type = bk_set_type
        self.session_id = session_id
        self.task_id = task_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.bk_biz_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.bk_error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.bk_error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.unique_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.bk_set_type = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.task_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("proc_async_rsp")
        if self.bk_biz_id is not None:
            oprot.writeFieldBegin("bk_biz_id", TType.STRING, 1)
            oprot.writeString(self.bk_biz_id.encode("utf-8") if sys.version_info[0] == 2 else self.bk_biz_id)
            oprot.writeFieldEnd()
        if self.bk_error_code is not None:
            oprot.writeFieldBegin("bk_error_code", TType.I32, 2)
            oprot.writeI32(self.bk_error_code)
            oprot.writeFieldEnd()
        if self.bk_error_msg is not None:
            oprot.writeFieldBegin("bk_error_msg", TType.STRING, 3)
            oprot.writeString(self.bk_error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.bk_error_msg)
            oprot.writeFieldEnd()
        if self.unique_id is not None:
            oprot.writeFieldBegin("unique_id", TType.STRING, 4)
            oprot.writeString(self.unique_id.encode("utf-8") if sys.version_info[0] == 2 else self.unique_id)
            oprot.writeFieldEnd()
        if self.bk_set_type is not None:
            oprot.writeFieldBegin("bk_set_type", TType.STRING, 5)
            oprot.writeString(self.bk_set_type.encode("utf-8") if sys.version_info[0] == 2 else self.bk_set_type)
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 6)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        if self.task_id is not None:
            oprot.writeFieldBegin("task_id", TType.STRING, 7)
            oprot.writeString(self.task_id.encode("utf-8") if sys.version_info[0] == 2 else self.task_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class proc_sync_rsp(object):
    """
    Attributes:
     - bk_error_code
     - bk_error_msg
     - result
     - session_id
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.I32,
            "bk_error_code",
            None,
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "bk_error_msg",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.MAP,
            "result",
            (TType.STRING, "UTF8", TType.STRING, "UTF8", False),
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "session_id",
            "UTF8",
            None,
        ),  # 4
    )

    def __init__(
        self,
        bk_error_code=None,
        bk_error_msg=None,
        result=None,
        session_id=None,
    ):
        self.bk_error_code = bk_error_code
        self.bk_error_msg = bk_error_msg
        self.result = result
        self.session_id = session_id

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.bk_error_code = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.bk_error_msg = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.result = {}
                    (_ktype80, _vtype81, _size79) = iprot.readMapBegin()
                    for _i83 in range(_size79):
                        _key84 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        _val85 = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                        self.result[_key84] = _val85
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.session_id = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("proc_sync_rsp")
        if self.bk_error_code is not None:
            oprot.writeFieldBegin("bk_error_code", TType.I32, 1)
            oprot.writeI32(self.bk_error_code)
            oprot.writeFieldEnd()
        if self.bk_error_msg is not None:
            oprot.writeFieldBegin("bk_error_msg", TType.STRING, 2)
            oprot.writeString(self.bk_error_msg.encode("utf-8") if sys.version_info[0] == 2 else self.bk_error_msg)
            oprot.writeFieldEnd()
        if self.result is not None:
            oprot.writeFieldBegin("result", TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.result))
            for kiter86, viter87 in self.result.items():
                oprot.writeString(kiter86.encode("utf-8") if sys.version_info[0] == 2 else kiter86)
                oprot.writeString(viter87.encode("utf-8") if sys.version_info[0] == 2 else viter87)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.session_id is not None:
            oprot.writeFieldBegin("session_id", TType.STRING, 4)
            oprot.writeString(self.session_id.encode("utf-8") if sys.version_info[0] == 2 else self.session_id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)


class user_info(object):
    """
    Attributes:
     - bk_username
     - password
     - login_time
     - ip
    """

    thrift_spec = (
        None,  # 0
        (
            1,
            TType.STRING,
            "bk_username",
            "UTF8",
            None,
        ),  # 1
        (
            2,
            TType.STRING,
            "password",
            "UTF8",
            None,
        ),  # 2
        (
            3,
            TType.I32,
            "login_time",
            None,
            None,
        ),  # 3
        (
            4,
            TType.STRING,
            "ip",
            "UTF8",
            None,
        ),  # 4
    )

    def __init__(
        self,
        bk_username=None,
        password=None,
        login_time=None,
        ip=None,
    ):
        self.bk_username = bk_username
        self.password = password
        self.login_time = login_time
        self.ip = ip

    def read(self, iprot):
        if (
            iprot._fast_decode is not None
            and isinstance(iprot.trans, TTransport.CReadableTransport)
            and self.thrift_spec is not None
        ):
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.bk_username = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.password = (
                        iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                    )
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.login_time = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.ip = iprot.readString().decode("utf-8") if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin("user_info")
        if self.bk_username is not None:
            oprot.writeFieldBegin("bk_username", TType.STRING, 1)
            oprot.writeString(self.bk_username.encode("utf-8") if sys.version_info[0] == 2 else self.bk_username)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin("password", TType.STRING, 2)
            oprot.writeString(self.password.encode("utf-8") if sys.version_info[0] == 2 else self.password)
            oprot.writeFieldEnd()
        if self.login_time is not None:
            oprot.writeFieldBegin("login_time", TType.I32, 3)
            oprot.writeI32(self.login_time)
            oprot.writeFieldEnd()
        if self.ip is not None:
            oprot.writeFieldBegin("ip", TType.STRING, 4)
            oprot.writeString(self.ip.encode("utf-8") if sys.version_info[0] == 2 else self.ip)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ["%s=%r" % (key, value) for key, value in self.__dict__.items()]
        return "%s(%s)" % (self.__class__.__name__, ", ".join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
